package tyk.Druid;

import com.alibaba.druid.pool.DruidDataSource;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.SQLException;

/***
 *@title Druid1
 *@description <TODO description class purpose>
 *@author Tang'ya'kang
 *@VERSION 1.0.0
 *@CREATE 2023/5/4 21:45
 **/
public class Druid1 {
    public static void main(String[] args) throws SQLException {
        DruidDataSource dataSource=new DruidDataSource();
        dataSource.setUrl("jdbc:mysql:127.0.0.1:3306/javaweb");
        dataSource.setName("root");
        dataSource.setPassword("123456");
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        Connection connection=dataSource.getConnection();
        //一系列的数据可sql操作


        connection.close();
    }
}
